import BaseGradientMaterial from './Materials/BaseGradient'
import LinearGradientMaterial from './Materials/LinearGradient'
import LineFlowMaterial from './Materials/LineFlow'

import MaterialTypes from "./MaterialTypes"

let MaterialFactory = {
    createMaterial(materialType, style) {
        switch (materialType) {
            case MaterialTypes.BASEGRADIENT:
                return new BaseGradientMaterial(style.color);
            case MaterialTypes.LINEARGRADIENT:
                return new LinearGradientMaterial(style.colorStops);
            case MaterialTypes.LINEFLOW:
                return new LineFlowMaterial(style);
        }
    }
}

export default MaterialFactory;
